<?php
header("Content-type:text/html;charset=utf-8");
$dsn = "mysql:host=localhost;dbname=c50";
$username="root";
$password = "admin888";
try{
	$pdo = new Pdo($dsn,$username,$password);
}catch(PDOException $e) {
	die($e->getMessage());
}

if($sth = $pdo->prepare('select sname FROM stu 
	WHERE sname = ? OR id >=?'))
{
	$name='小明';
	$id=1;
	$sth->bindParam(1, $name);
	$sth->bindParam(2, $id);
	$sth->execute();
	$row = $sth->fetchAll();
	print_r($row);
}	
